begintownscript;

variables;

int i,j,k,choice;

body;

beginstate INIT_STATE;

if (get_flag(2, 1) > 0)
{
	erase_char(9);
}

if (get_flag(2, 0) == 0)
{	force_instant_terrain_redraw();
	set_flag(2, 0, 1);
	reset_dialog();
	add_dialog_str(0, "In front of you, near the pool, you see a flash of yellow.", 0);
	add_dialog_str(1, "That can only mean one thing. A cuachicqueh, a shorn one, a mage of terrible powers.", 0);
	add_dialog_str(2, "They are to blame for the corruption of their people, and the proliferation of foul magicks.", 0);
	add_dialog_str(3, "The shorn one must die. Hopefully looking like an Eagle Warrior will help in this task.", 0);
	add_dialog_choice(0, "OK");
	run_dialog(1);
}

break;

beginstate EXIT_STATE;
// Always called when the town is left.
break;

beginstate START_STATE;
// This state is called every turn the party is in this town.

break;

beginstate 10;
break;

beginstate 11;
	reset_dialog();
	add_dialog_str(0, "You suspect that, now you're impersonating an Eagle Warrior, you should just get on with the job.", 0);
	add_dialog_str(1, "That means going in the other direction.", 0);
	add_dialog_choice(0, "OK");
	run_dialog(1);
	block_entry(1);
break;

beginstate 12;
	if (get_flag(2, 1) == 0)
	{
		set_flag(2, 1, 1);
		reset_dialog();
		add_dialog_str(0, "You realise that something is just a little wrong. Surrounding the pool are corpses of native soldiers.", 0);
		add_dialog_str(1, "The mage is leaning over the water, breathing heavily.", 0);
		add_dialog_str(2, "By the time you realise what's happening, it's too late to do anything - not that you would anyway.", 0);
		add_dialog_str(3, "The mage's arm is dangling in the water, bleeding heavily. Suddenly, he slips forward and, within seconds his blood is staining the water.", 0);
		add_dialog_choice(0, "OK");
		run_dialog(1);

		erase_char(9);

		run_animation_sound(84);
		
		reset_dialog();
		add_dialog_str(0, "You'd been hoping to not have to witness a pirahna attack first hand while you were here.", 0);
		add_dialog_str(1, "There is an upside, though. Beside where the shorn one had been lying, there is a small obsidite object in the mud.", 0);
		add_dialog_str(2, "It is a perfectly proportioned skull, a remarkable achievement in a material as hard to work with as obsidite.", 0);
		add_dialog_str(3, "On a hunch that it might come in useful - or at least look good on your mantelpiece when you get back - you place it into your pack.", 0);
		add_dialog_choice(0, "OK");
		run_dialog(1);
		set_flag(2, 1, 1);
		change_spec_item(1,1);
	}
break;

beginstate 13;
	if (get_flag(2, 1) == 0)
	{
		reset_dialog();
		add_dialog_str(0, "The natives' temple is not too far off in the distance.", 0);
		add_dialog_str(1, "Still, it's probably better to get rid of this mage while you have the chance.", 0);
		add_dialog_choice(0, "OK");
		run_dialog(1);
		block_entry(1);
	}
break;
